@model Discussion.Web.ViewModels.ForgotPasswordModel
@{
    ViewData["Title"] = "找回密码";
}

<div class="row">
    <div class="panel no-padding panel-topic-list col-xs-12 col-sm-12 col-md-12 col-lg-12">
        <div class="panel-heading">
            找回密码
        </div>

        <div class="panel-body login-form">
            <fieldset class="form-group">
                <label asp-for="UsernameOrEmail">
                    请输入用户名或者已经确认过的邮箱
                </label>
                @Html.TextBoxFor(m => m.UsernameOrEmail, new
                {
                    autofocus = true,
                    autocomplete = "on",
                    @class = "form-control",
                    maxlength = 50
                })
                <br/>
                <div rel="forgot-password">
                    <a data-status="send" class="forgot-operation link">发送邮件</a>
                    <a data-status="re-send" class="forgot-operation link" hidden>再次发送</a>
                    <span data-status="sending" class="forgot-operation" hidden>正在发送..</span>
                    <span data-status="sent" class="forgot-operation text-muted" hidden>
                        邮件已发出，<span data-status="sent-1">请查收邮件完成重置密码</span><span data-status="sent-2" class="countdown"></span><span data-status="sent-2"> 秒后可再次发送</span>
                    </span>
                    <span data-status="error" class="forgot-operation text-danger" hidden></span>
                </div>
            </fieldset>
        </div>
    </div>
</div>

@section Tail {
    <script>
        var actionUrl = '@Url.Action("DoForgotPassword", "Account")';

        $(function() {
            var accountModule = window.DiscussionApp.account;
            accountModule.password.setupForgot(actionUrl);
        });
    </script>
}
